-- GENERATED SPELL FOR [Thuzadin Shadowcaster] --


function spell0_10398(pUnit, Event) --@Cripple,n/a--
pUnit:FullCastSpellOnTarget(11443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10398', 18000, 1)
end

function spell1_10398(pUnit, Event) --@Piercing Shadow,n/a--
pUnit:FullCastSpellOnTarget(16429,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10398', 2000, 1)
end

function spell2_10398(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15232,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10398', 3000, 1)
end

function Sorts_10398(pUnit, Event)
local choix_sorts_10398 = math.random(0, 2)
if choix_sorts_10398 == 0 then
pUnit:RegisterEvent('spell0_10398', 1, 1)
end
if choix_sorts_10398 == 1 then
pUnit:RegisterEvent('spell1_10398', 1, 1)
end
if choix_sorts_10398 == 2 then
pUnit:RegisterEvent('spell2_10398', 1, 1)
end
end

function mob10398_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10398', math.random(1500, 3000), 1)
end

function mob10398_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10398_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10398_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10398, 1, 'mob10398_Action')
RegisterUnitEvent(10398, 2, 'mob10398_Leave')
RegisterUnitEvent(10398, 3, 'mob10398_Kill')
RegisterUnitEvent(10398, 4, 'mob10398_Die')
